<template>
<span :class="wrapper_name">

  <button v-if="col.btns.EDITPRICE" class="ui button primary mini" @click.stop.prevent="edit_price(col.val)" title="编辑价格">
    {{col.btns.EDITPRICE}}
  </button>
</span>
</template>
<script type="text/ecmascript-6">
import tool from 'src/util/tool';
import util from '_util/index';
import logic from '_logic';
export default {
    data() {
        return {}
    },
    methods: {
		edit_price(id){
			let _this = this;
			let product_id_real =logic.detail.getDetail(_this, _this._id,'product_id_real').val;
			this.$store.state.global.eventVue.$emit('showPopCom', {
				_this: this,
				id: id,
				data: {
					fn: {
						sure: function(data) {
						}
					},
					product_id:product_id_real,
					field: {
						bindModel: 103,
						bind_type: 1,
						title: '添加商品',
						name: 'id',
						bind_name_field: 'name',
					}
				},
				name: 'proStockEdit'
			});
		},
    },
    computed: {
        ctl() {
            return this.$route.query.ctl;
        },
        is_admin() {
            return util.is_admin(this);
        },
    },
    watch: {},

    props: ['col', '_id', 'detail_info', 'wrapper_name'],
    created() {},
}
</script>
<style rel="stylesheet/less" lang="less">
</style>
